/*
  Tên:Trần Hoàng Lâm
  MSSV:11379951
  Lớp:DHTH7DLT
  Ngày hoàn thành:28/04/2012
  */
#ifndef FRBAOCAOTON_H
#define FRBAOCAOTON_H

#include <QDialog>
#include "mysqlconnection.h"
#include <QMessageBox>
#include "dateformatdelegate.h"
#include "QStandardItem"

namespace Ui {
    class frbaocaoton;
}

class frbaocaoton : public QDialog
{
    Q_OBJECT

public:
    explicit frbaocaoton(QWidget *parent = 0);
    ~frbaocaoton();


private:
    Ui::frbaocaoton *ui;
     MySqlConnection *DB;
     int tinhSachNhapTrongThang(QString maSach,QString thang);
     int tinhSachBanTrongThang(QString maSach,QString thang);
     int tinhSoLuongPhatSinh();
     int tinhSoLuongTonCuoi();
     QString ngaythang;
     void luuTonkho();
     void loadDS(QString NgayThang);
     QStandardItemModel *dataTonKho;
     void loadPreviewTon(QString NgayThang);
private slots:
    void eventSelectDateChange();
    void locMaSach();
    void capNhatTonKho();


    void on_btnThoat_clicked();
};

#endif // FRBAOCAOTON_H
